<?xml version='1.0' encoding='ISO-8859-1' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"   
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:composite="http://java.sun.com/jsf/composite"
      xmlns:ui="http://java.sun.com/jsf/facelets">

    <h:head>
        <f:loadBundle basename="com.brain.core.i18n.ApplicationResources" var="message" />
        <title><h:outputText value="#{message['general.cabecera.titulo.aplicacion']}"/></title>            
        <link type="text/css" rel="stylesheet" href="#{request.contextPath}/recursos/css/default.css" />
        <link type="text/css" rel="stylesheet" href="#{request.contextPath}/recursos/css/theme.css" />
        <script type="text/javascript" src="#{request.contextPath}/recursos/js/script.js" /> 
    </h:head>

    <composite:interface>    

    </composite:interface>
    <composite:implementation>   
        <SCRIPT language="JavaScript" type="text/javascript">       
            function handleGuardarOperacionDeta(xhr, status, args) {                     
                if(args.validationFailed) {  
     
                } else {                              
                    wVPlanContableDeta.hide();  
                    jQuery('#btnGuardarDeta').fadeOut();  
                }  
            }  
        </SCRIPT>
        <h:form onsubmit="return checkSubmit();"  id="frmPlanContableDeta" prependId="false">
            <p:growl id="msMensaje" showDetail="false"/>
            <h:panelGrid columns="1" id="idpGPlanContable">

                <h:outputLabel value="#{i18n['label.plan.contable.deta.padre']}" styleClass="label" />  
                <h:outputLabel styleClass="label" value="#{planContableMBean.detaDto.cuentaPadreDto.descripcion}" />                
                <p:spacer/>
                <p:spacer/>
                <h:outputLabel styleClass="label" value="#{i18n['label.plan.contable.deta.descripcion']}"/>
                <p:inputText label="#{i18n['label.plan.contable.deta.descripcion']}" required="true"
                             value="#{planContableMBean.detaDto.descripcion}"  readonly="#{sessionMBean.accion == 3}"
                             size="40" style="#{applicationMBean.estiloObligatorio}">
                    <f:validateLength maximum="100" minimum="2" />
                </p:inputText>

                <h:outputLabel styleClass="label" value="#{i18n['label.plan.contable.deta.cuenta']}"/>
                <p:inputText label="#{i18n['label.plan.contable.deta.cuenta']}" required="false"
                             value="#{planContableMBean.detaDto.cuenta}"  readonly="#{sessionMBean.accion == 3}"
                             size="40" style="#{applicationMBean.estiloObligatorio}">
                    <f:validateLength maximum="50" minimum="0" />
                </p:inputText>



            </h:panelGrid>
            <p:panel id="pnlBotones">
                <h:panelGrid columns="10">
                    <p:commandButton id="btnGuardarDeta" title="#{i18n['general.button.guardar.tip']}" accesskey="#{applicationMBean.keyGuardar}" ajax="true" 
                                     icon="ui-icon ui-icon-disk" update=":frmPlanContableDeta,:frmPrincipal"                    
                                     value="#{i18n['general.button.guardar']}"
                                     style="#{applicationMBean.estilosBtnGuardar}"
                                     oncomplete="handleGuardarOperacionDeta(xhr, status, args);"
                                     actionListener="#{planContableMBean.guardarPlanContableDeta}">                                    
                    </p:commandButton>     

                </h:panelGrid>

            </p:panel>
        </h:form>
    </composite:implementation>

</html>